package com.bcxj.apiboss.controller;

import com.bcxj.apiboss.service.DriverUserService;
import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.internalcommon.entity.DriverUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.sql.Driver;

/**
 * ClassName: DriverUserController
 * Package: com.bcxj.apiboss.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/10/19 11:52
 * @Version 1.0
 * @Since 1.0
 */
@RestController
@RequestMapping("/driver-user")
public class DriverUserController {

    @Autowired
    private DriverUserService driverUserService;


    /**
     * 增加司机用户
     * @param driverUser
     */
    @PostMapping
    public ResponseResult createDriverUser(@RequestBody DriverUser driverUser) {
        return driverUserService.addDriverUser(driverUser);
    }


    /**
     * 修改司机信息
     * @param driverUser
     * @return
     */
    @PutMapping
    public ResponseResult updateDriverUser(@RequestBody DriverUser driverUser) {
        return driverUserService.updateDriverUser(driverUser);
    }

}
